﻿using System.Windows;
using Airborne.ScrumPoker.Module.Client;
using Airborne.ScrumPoker.Module.Developer;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.UnityExtensions;

namespace Airborne.ScrumPoker.Presentation.Client
{
    internal class Bootstrapper : UnityBootstrapper
    {
        protected override IModuleEnumerator GetModuleEnumerator()
        {
            StaticModuleEnumerator staticModuleEnumerator = new StaticModuleEnumerator();
            staticModuleEnumerator.AddModule(typeof(DeveloperModule));
            staticModuleEnumerator.AddModule(typeof(ClientModule));
            return staticModuleEnumerator;
        }

        protected override DependencyObject CreateShell()
        {
            Shell shell = Container.Resolve<Shell>();
            shell.Show();
            return shell;
        }
    }
}
